<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            /* 透视 */
            /* 设置上帝视角的位置 */
            /* 必须写在变换元素的父元素上 */
            perspective: 700px;
        }
        .box {
            width: 100px;
            height: 100px;
            background-color: red;
            transform: rotateY(0deg);
            margin: 100px;
            transition: transform 1s linear;
        }
        .box:hover {
            transform: rotateY(360deg);
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>